home *** CD-ROM | disk | FTP | other *** search
- {************************************************}
- { }
- { E! for Windows }
- { (c) - Patrick Philippot - 1992,1993 }
- { }
- { MulHelp Extension DLL - version 2.0 }
- { }
- { Supporting multiple Help Files from E!. }
- { }
- {************************************************}
-
- (*
- MULHELP is a simple EWD allowing use of multiple help files from within
- E!. There are many situations where you have to refer to multiple help
- files. For example, when writing Visual C++ source code with E!, you may
- want to refer to the Windows 3.1 SDK, the MFC 2.0 and the C/C++ language
- help files. It would be nice to load one of this file at will when the
- cursor is located on a keyword.
-
- With MULHELP you can.
-
- The first thing you have to do is to create a new section in EW.INI:
- [extended help]. Then, you will list in that section the help files
- you want to use, as follows:
-
- HelpName1=file1.hlp
- HelpName2=file2.hlp
- HelpName3=file3.hlp
-
- and so on...
-
- Second, you should load MULHELP from the User menu (you can also install
- MULHELP as an autoloaded EWD). MULHELP.EWD must reside in your USER
- directory.
-
- Third, open the Keyboard Assignment dialog box, select "Assign DLL" and
- MULHELP and assign MULHELP to, say, three different keystrokes, typing in
- each time a different Routine Id in the RoutineId field (1 for HelpName1, 2
- for HelpName2, ...).
-
- You may use any unsigned integer as a Routine Id as long as it reflects the
- HelpName entry (e.g. HelpName20 will be used with Routine ID 20).
-
- For example, I have setup MULHELP for my personal needs as follows:
-
- [extended help]
- HelpName1=win31wh.hlp
- HelpName2=mfc.hlp
- HelpName3=mscxx.hlp
-
- Key Assignments:
-
- MULHELP assigned to SHIFT+F1 with Routine Id 1
- MULHELP assigned to ALT+F1 with Routine Id 2
- MULHELP assigned to ALT+CTRL+F1 with Routine Id 3
-
- Now, when I hit SHIFT+F1 while the cursor is located on a keyword, I open
- the Windows 3.1 SDK help file (this was the standard behavior of E!). When
- I do the same with ALT+F1, I open the MFC help file with the same keyword.
- Ditto for ALT+CTRL+F1 with the C/C++ language help file.
-
- Enjoy!
-
- Patrick Philippot
- 07/08/93
- *)
-
- {$I compdir.inc}
- {$C MOVEABLE PRELOAD DISCARDABLE}
-
- library MulHelp;
-
- uses WinProcs, WinTypes, EWApImp2, Strings;
-
- const
- HelpEntry : PChar = 'HelpName';
- HelpSection : PChar = 'Extended Help';
- Profile : PChar = 'ew.ini';
-
- var
- EntryValue : array[0..80] of char;
- HelpCurEntry : array[0..15] of char;
-
- function EWExecute(RoutineId : word) : integer; export;
-
- var
- IDStr : array[0..5] of char;
-
- begin
- EWExecute := 0;
- Str(RoutineId, IDStr);
- StrCat(StrCopy(HelpCurEntry, HelpEntry), IDStr);
- if GetPrivateProfileString(HelpSection, HelpCurEntry, '', EntryValue, SizeOf(EntryValue), Profile) <> 0 then begin
- WritePrivateProfileString('system', 'alternatehelp', EntryValue, Profile);
- EWAlternateHelp(EWGetCaretPosX, EWGetCaretPosY);
- end else
- EWMessageBox(GetFocus, 'No such Entry.', 'Extended Help', mb_Ok or mb_IconExclamation);
- end;
-
- exports
- EWExecute index 1;
-
- begin
- end.
-